package com.zijie.rbac.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zijie.rbac.model.Perm;
import com.zijie.rbac.model.Resource;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PermService {
    //查找
    Page<Perm> findAll(Page<Perm> page, Perm perm);
    //新增
    boolean add(Perm perm);
    //修改
    boolean update(Perm perm);
    //删除
    int deleteById(Integer id);
    //批量删除
    int deleteByIds(List<Integer> ids);

    int assignResources(Integer permId, Integer[] resourceIds);

    List<Resource> resources(Integer permId);


    int deleteResources(Integer permId, Integer resourceId);

    Perm findById(Integer permId);
}
